package com.leo.springbootmultithreadbasic.synchronizedkey.synchronizedmethod.lockreentrant;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Leo
 * @version V1.0
 */
public class MyService {

    private static final Logger logger = LoggerFactory.getLogger(MyService.class);

    synchronized public void test1() {
        logger.info("test1 method");
        test2();
    }

    synchronized public void test2() {
        logger.info("test2 method");
        test3();
    }

    synchronized public void test3() {
        logger.info("test3 method");
    }

}
